import Vue from "vue";
import Vuex from "vuex"
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    isLogin: false,
    name: '',
    id: '',
    password: ''
  },
  mutations: {
    setInfo(state,value) {
      state.id = value.id;
      state.name = value.name;
      state.password = value.password;
    },
    login(state) {
      state.isLogin = true;
    },
    logout(state) {
      state.isLogin = false;
    }
  }
})
